#!/bin/bash

CUR_DIR=$(cd "$(dirname $0)" && pwd)
ROOT_DIR=$(dirname "$CUR_DIR")
ROOT_DIR=$(dirname "$ROOT_DIR")
ROOT_DIR=$(dirname "$ROOT_DIR")
source "$ROOT_DIR/bin/shell_func.sh"

if [ $? -ne 0 ] ; then echo "Terminating..." >&2; exit 1; fi

multitail -csn -cS Apache -ke '^[0-9/]+ [0-9][0-9]:' -ke ' [0-9]+#[0-9]+: ' -ke ' debug\.lua:[0-9]+: _?print[a-z]+\(\):' -ke ', client: .+$' -ke '\[lua\] debug.lua:[0-9]+: dump\(\)' "$ROOT_DIR/logs/nginx-error.log"
